<template>
  <page-layout :avatar="currUser.avatar">
    <div slot="headerContent">
      <div class="title">{{welcome.timeFix}}，{{currUser.name}}，{{welcome.message}}</div>
      <div>{{currUser.position}}</div>
    </div>
    <template slot="extra">
      <head-info class="split-right" title="项目数" content="56"/>
      <head-info class="split-right" title="团队排名" content="8/24"/>
      <head-info class="split-right" title="项目访问" content="2,223"/>
    </template>

  </page-layout>
</template>

<script>
import PageLayout from '@/layouts/PageLayout'
import HeadInfo from '@/components/tool/HeadInfo'
// import {mapState} from 'vuex'
// import {request, METHOD} from '@/utils/request'

export default {
  name: 'Menus',
  components: {HeadInfo, PageLayout},
  data () {
    return {
      // projects: [],
      loading: true,
      activities: [],
      // teams: [],
      welcome: {
        timeFix: '下午好',
        message: '注意休息'
      },
      currUser: {
        name: '彭治皓',
        position: '系统管理员'
      },
    }
  },
  computed: {
    // ...mapState('account', {currUser: 'user'}),
    // ...mapState('setting', ['lang'])
  },
  created() {
    // request('/user/welcome', METHOD.GET).then(res => this.welcome = res.data)
    // request('/work/activity', METHOD.GET).then(res => this.activities = res.data)
    // request('/work/team', METHOD.GET).then(res => this.teams = res.data)
    // request('/project', METHOD.GET).then(res => {
    //     this.projects = res.data
    //     this.loading = false
    //   })
  }
}
</script>

<style lang="less">
@import "index";
</style>
